import requests

def sendAll(message:str):
    # url = "机器人webhook地址"
    url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=8b47af31-e289-47e5-88eb-8923e01738fd"
    headers = {
        "Content-Type": "application/json"
    }
    data = {
        "msgtype": "text",
        "text": {
            "content": message,
            # "mentioned_list": ["@all"]
            # "mentioned_list": ["@zhaozhiyong"]
            "mentioned_list": ["zhaozhiyong", "@all"],
        }
    }
    response = requests.post(url, headers=headers, json=data)
    records = response.json()
    return records

if __name__ == '__main__':

    sendAll("baimeidashu测试 sendAll")